'''
Created on Jul 4, 2011

@author: vakumar
'''
from com.sorts.quicksort import QuickSorter
from com.sorts.mergesort import MergeSorter
from com.sorts.heapsort import HeapSorter

class Sorter(object):
    '''
    classdocs
    '''
    _QUICK = 'quicksort'
    _MERGE = 'mergesort'
    _HEAP = 'heapsort'
    

    @staticmethod
    def getsorter(name, arr):
        sorters = { Sorter._QUICK : QuickSorter(arr),
                   Sorter._MERGE : MergeSorter(arr),
                   Sorter._HEAP : HeapSorter(arr)
                   } 
        return sorters[name] if name in sorters else None
    
    def dosort(self):
        pass